package com.lanou.moving.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.LinearInterpolator;

import com.lanou.moving.R;
import com.lanou.moving.base.BaseFragment;
import com.lanou.moving.volley.StringRequestUtf;
import com.lanou.moving.volley.VolleySingleton;

import de.hdodenhof.circleimageview.CircleImageView;

/**
 * Created by 刘琪 on 15/11/9.
 */
public class MusicPictureFragment extends BaseFragment {
    private CircleImageView albumPic;//专辑图片
    private Animation animation;//旋转动画

    // 获取专辑图片
    private String url;
    private StringRequestUtf request;
    private VolleySingleton volleySingleton;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.music_picture, null);
        albumPic = (CircleImageView) view.findViewById(R.id.albumPic);
        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        volleySingleton = VolleySingleton.getInstance(mContext);
        // 旋转动画
        animation = AnimationUtils.loadAnimation(mContext, R.anim.play_rotate);
        LinearInterpolator linear = new LinearInterpolator();
        animation.setInterpolator(linear);
        albumPic.startAnimation(animation);
    }
}
